

**this code runs analyses for all observational results in the paper**
**it requires the following files to run:
**use "/Users/bishin/Dropbox/backlash/annenberg stuff/MA.S.C.Data.ruling.16.days.dta"**
**use "/Users/bishin/Dropbox/backlash/annenberg stuff/Bush.FMA.Announce.data.2.24.04.dta", replace**
**use "/Users/bishin/Dropbox/backlash/annenberg stuff/CA.S.C.Data.ruling.16.days.dta", clear**
**use "/Users/bishin/Dropbox/backlash/annenberg stuff/weekly.gay.attitude.data.dta", replace**

*******************
**Table 2 Results**
*******************
**we begin with the Massachusetts results**
use "MA.S.C.Data.ruling.16.days.dta"

**Group 1 is after the event and group 0 is before**
**All signs are opposite those in the paper so backlash takes negative values***

***first lets examine the attitudes toward the FMA before and after MA ruling**
ttest  fmamdtoppose , by(ruling)
ttest  fmamdtoppose if wbornagain==1, by(ruling)
ttest  fmamdtoppose if moderate==1, by(ruling)
ttest  fmamdtoppose if unsophisticated==1, by(ruling)

**Bush Announcement: : Second Column in Table 2**
use "Bush.FMA.Announce.data.2.24.04.dta", replace

***first lets examine the attitudes toward the FMA before and after Bush came out supporitng it**
ttest  fmamdtoppose2 , by(Bushannounce)
ttest  fmamdtoppose2 if wbornagain==1, by(Bushannounce)
ttest  fmamdtoppose2 if moderate==1, by(Bushannounce)
ttest  fmamdtoppose2 if unsophisticated==1, by(Bushannounce)

**State Marriage Opinion before vs after Bush Announcment**
ttest  gmfavor , by(Bushannounce)
ttest  gmfavor if wbornagain==1, by(Bushannounce)
ttest  gmfavor if moderate==1, by(Bushannounce)
ttest  gmfavor if unsophisticated==1, by(Bushannounce)

**CA Ruling: Third Column in Table 2**
use "CA.S.C.Data.ruling.16.days.dta", clear

***Attitudes toward FMA before and after CA ruling**
ttest  fmamdtoppose , by(ruling)
ttest  fmamdtoppose if wbornagain==1, by(ruling )
ttest  fmamdtoppose if moderate==1, by(ruling )
ttest  fmamdtoppose if unsophisticated==1, by(ruling )

**State Marriage Opinion before vs after CA Ruling**
ttest  gmfavor , by(ruling)
ttest  gmfavor if wbornagain==1, by(ruling )
ttest  gmfavor if moderate==1, by(ruling )
ttest  gmfavor if unsophisticated==1, by(ruling )

**************
***Table 3****
**************

***Massachusetts Ruling: Table 3 Regression Models***
use "MA.S.C.Data.ruling.16.days.dta",clear

ologit fmamdtoppose    ruling gop democrat mormon catholic wbornagain howoften white black hispanic female age liberalism
ologit fmamdtoppose    ruling gop democrat mormon catholic howoften white black hispanic female age liberalism if wbornagain==1
ologit fmamdtoppose    ruling gop democrat mormon catholic wbornagain howoften white black hispanic female age liberalism  if moderate ==1
ologit fmamdtoppose    ruling gop democrat mormon catholic wbornagain howoften white black hispanic female age liberalism  if unsophisticated ==1

***Bush Announcement: Table 3 Regression models ***
use "Bush.FMA.Announce.data.2.24.04.dta", replace

ologit  fmamdtoppose    Bushannounce  gop democrat mormon catholic wbornagain howoften white black hispanic female age liberalism
ologit  fmamdtoppose    Bushannounce  gop democrat mormon catholic howoften white black hispanic female age liberalism if wbornagain==1
ologit  fmamdtoppose    Bushannounce  gop democrat mormon catholic wbornagain howoften white black hispanic female age liberalism  if moderate ==1
ologit  fmamdtoppose    Bushannounce  gop democrat mormon catholic wbornagain howoften white black hispanic female age liberalism  if unsophisticated ==1


***California Court Ruling: Table 3 Regression models ****
use "CA.S.C.Data.ruling.16.days.dta", clear
ologit fmamdtoppose    ruling gop democrat mormon catholic wbornagain howoften white black hispanic female age liberalism
ologit fmamdtoppose    ruling gop democrat mormon catholic howoften white black hispanic female age liberalism if wbornagain==1
ologit fmamdtoppose    ruling gop democrat mormon catholic wbornagain howoften white black hispanic female age liberalism  if moderate ==1
ologit fmamdtoppose    ruling gop democrat mormon catholic wbornagain howoften white black hispanic female age liberalism  if unsophisticated ==1



************
**Figure 6**
************

use "weekly.gay.attitude.data.dta", replace

line allgayfavor week || line modgayfavor week, lp(-) ||  line bagayfavor week,  yscale(range(.5 4.5)) xscale(range(0 53)) xline(7 20 22, lp(.)) leg(off) text( 2.8 49 "Evangelicals")text( 3.4 31 "Nat'l Average") text(4.8 7 "Massachusetts Ruling") text(4.7 42 "Independents") text(1.5 20 "Bush" "Announcement") text(.75 22 "California" "Ruling") xlabel(2 "Oct. 15" 10"Dec. 15" 19 "Feb. 15" 27"April 15" 36 "June 15" 44 "Aug. 15" 53"Oct. 15", alternate) xtitle("") ytitle("Attitudes toward Gay Groups") scheme(s1mono)


****************
***Appendix G***
****************
***Massachusetts Ruling ***
use "MA.S.C.Data.ruling.16.days.dta",clear
estpost ttest  ruling gop democrat mormon catholic wbornagain howoften mass white black hispanic female age liberalism, by(ruling)
esttab, wide nonumber mtitle("Difference")


****Bush Announcement****
use "Bush.FMA.Announce.data.2.24.04.dta", replace
estpost ttest gop democrat mormon catholic wbornagain howoften mass white black hispanic female age liberalism, by(Bushannounce)
esttab, wide nonumber mtitle("Difference")

***California Court Ruling****
use "CA.S.C.Data.ruling.16.days.dta", clear
estpost ttest gop democrat mormon catholic wbornagain howoften mass white black hispanic female age liberalism, by(ruling)
esttab, wide nonumber mtitle("Difference")

***********************************
***Appendix I  Regression Models***
***********************************

****gay groups dependent variable results******
***Massachusetts Ruling ***

use "MA.S.C.Data.ruling.16.days.dta",clear

reg gayfavor    ruling gop democrat mormon catholic wbornagain howoften white black hispanic female age liberalism
reg gayfavor    ruling gop democrat mormon catholic howoften white black hispanic female age liberalism if wbornagain==1
reg gayfavor    ruling gop democrat mormon catholic wbornagain howoften white black hispanic female age liberalism  if moderate ==1
reg gayfavor    ruling gop democrat mormon catholic wbornagain howoften white black hispanic female age liberalism  if unsophisticated ==1

***Bush Announcement ****
use "Bush.FMA.Announce.data.2.24.04.dta", replace

reg  gayfavor    Bushannounce  gop democrat mormon catholic wbornagain howoften white black hispanic female age liberalism
reg  gayfavor    Bushannounce  gop democrat mormon catholic howoften white black hispanic female age liberalism if wbornagain==1
reg  gayfavor    Bushannounce  gop democrat mormon catholic wbornagain howoften white black hispanic female age liberalism  if moderate ==1
reg  gayfavor    Bushannounce  gop democrat mormon catholic wbornagain howoften white black hispanic female age liberalism  if unsophisticated ==1

***California Court Ruling****
use "CA.S.C.Data.ruling.16.days.dta", clear
reg gayfavor    ruling gop democrat mormon catholic wbornagain howoften white black hispanic female age liberalism
reg gayfavor    ruling gop democrat mormon catholic howoften white black hispanic female age liberalism if wbornagain==1
reg gayfavor    ruling gop democrat mormon catholic wbornagain howoften white black hispanic female age liberalism  if moderate ==1
reg gayfavor    ruling gop democrat mormon catholic wbornagain howoften white black hispanic female age liberalism  if unsophisticated ==1









